#include <string>
#include <iostream>
class string_iter
{
    std::string& _str;
    int _index;
public:
    string_iter(std::string& str):_str(str),_index(0)
        {
        }
    char& next()
        {
            return _str[_index++];
        }
};
int main()
{
    std::string str="abc";
    string_iter it(str);
    std::cout << it.next() << std::endl;
    
}

    
    
